Background Removal Plugin
Plugin for background removal. This plugin adds a button to the Dock that removes the background of the current page's image. Add InspectorBar.Button.rememberBackgroundRemoval with inspectorBarModifier to remove the background of the selected image or page. The results are PNG files in the app's cache directory, which Android can clear. To keep them, upload the file:// URIs that engine.editor.findAllMediaURIs() returns, and point the scene to the uploads with engine.editor.relocateResource.
Properties
Background removal configuration object. Check BackgroundRemovalPlugin inheritors for available options.
Returns the editor dock with the background removal button inserted by dockModifier.
The Dock modifier in order to place the Dock.Button.rememberBackgroundRemoval button. By default, it is prepended to the dock.
Returns the editor inspector bar with the background removal button inserted by inspectorBarModifier, or the parent's inspector bar when inspectorBarModifier is null.
The InspectorBar modifier in order to place the InspectorBar.Button.rememberBackgroundRemoval button. By default, it is null, and the plugin leaves the inspector bar unchanged. To prepend the button, set inspectorBarModifier = { addFirst { InspectorBar.Button.rememberBackgroundRemoval(config = it) } }.
Initializes the configured background remover after the parent configuration is created.